package biz.inspeed.test.io;

import java.security.SecureRandom;

public class IdUtil
{	
	private static SecureRandom rng;
	
	/**获取id的byte数组，UUID的byte形式**/
	public static byte [ ] getID ()
	{
		 byte[] data ;//= new byte[16];
		 synchronized (IdUtil.class) {
	            if (rng == null) {
	                rng = new SecureRandom();
	            }
	        }
		 rng.nextBytes(data = new byte[16]);
		 return data;
	}

}
